package com.sun.controller;

import com.sun.annotation.Master;
import com.sun.model.UserInfo;
import com.sun.service.UserInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class UserController {

    @Resource
    private UserInfoService userInfoService;

    @Master
    @GetMapping("/all")
    public List<UserInfo> findAll(){
      return  userInfoService.list();
    }
}
